<?
if(!ANTIHACK) die("ANTIHACK...");
include_once(INCLUDES."buildlink.php");
if($_GET["code"]!="")
{
	$code=$_GET["code"];
	$q=query("select * from page,menu where page.menuid=menu.id and code='$code'");
	$r=fetch($q);
}
else if($_GET["id"]!="")
{
	$id=$_GET["id"];
	$q=query("select * from post where id=$id");
	$r=fetch($q);
}
if($r["time"]) $r["time"]=date("H:i d/m/Y",$r["time"]);
$r["link"]="http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$smarty->assign("share",$r);
$smarty->display("share-top.htm");
?>